package com.ilink.ilinkcommon.service.oss;

import java.io.File;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
/**
 * <h3>iLink-java-backend-zhangbo2</h3>
 *
 * @Description <p>阿里云OSS存储服务接口</p>
 * @Author ZhangBo
 * @Date 2024-09-15 19:17
 **/
public interface OssService {
    boolean uploadFile(MultipartFile file, String path, String rename);
    boolean uploadFile(byte[] bytes, String path, String rename);
    boolean uploadFile(File file,String path,  String rename);
    boolean uploadBucketFile(MultipartFile file, String bucketName, String objectName);
    String getFileUrl(String objectName);
    String getBucketFileUrl(String bucketName, String objectName);
    

    List<String> listFiles(String prefix);

    boolean deleteFile(String fileName,String path);
    boolean deleteDirectory(String directory);

    boolean createDirectory(String directory, String path);

    boolean moveFile(String filename, String ori_path, String tar_path);
    boolean moveTranFile(String ori, String des);

    boolean uploadUrl(String fileUrl, String objectName);

    public boolean moveDirectory(String ori_path, String tar_path);

    String getImageUrl(String bucketName, String objectBaseName);
    String getIconUrl(String bucketName, String objectBaseName);
    String getFrontendIconUrl(String bucketName, String objectBaseName);
    String getStudyTreeResourceUrl(String bucketName, String objectBaseName);
    String uploadFileAndGetUrl(MultipartFile file, String bucketName, String objectName);

}
